package indzcraft.loader;
import java.util.HashMap;

/*
this.put2(113,"Spirit","Dodge Rating");
this.put2(114,"Spirit","Parry Rating");
this.put2(115,"Spirit","Hit Rating");
this.put2(116,"Spirit","Crit Rating");
this.put2(117,"Spirit","Haste Rating");
this.put2(118,"Spirit","Expertise Rating");
this.put2(119,"Spirit","Mastery");
this.put2(120,"Dodge Rating","Spirit");
this.put2(121,"Dodge Rating","Parry Rating");
this.put2(122,"Dodge Rating","Hit Rating");
this.put2(123,"Dodge Rating","Crit Rating");
this.put2(124,"Dodge Rating","Haste Rating");
this.put2(125,"Dodge Rating","Expertise Rating");
this.put2(126,"Dodge Rating","Mastery");
this.put2(127,"Parry Rating","Spirit");
this.put2(128,"Parry Rating","Dodge Rating");
this.put2(129,"Parry Rating","Hit Rating");
this.put2(130,"Parry Rating","Crit Rating");
this.put2(131,"Parry Rating","Haste Rating");
this.put2(132,"Parry Rating","Expertise Rating");
this.put2(133,"Parry Rating","Mastery");
this.put2(134,"Hit Rating","Spirit");
this.put2(135,"Hit Rating","Dodge Rating");
this.put2(136,"Hit Rating","Parry Rating");
this.put2(137,"Hit Rating","Crit Rating");
this.put2(138,"Hit Rating","Haste Rating");
this.put2(139,"Hit Rating","Expertise Rating");
this.put2(140,"Hit Rating","Mastery");
this.put2(141,"Crit Rating","Spirit");
this.put2(142,"Crit Rating","Dodge Rating");
this.put2(143,"Crit Rating","Parry Rating");
this.put2(144,"Crit Rating","Hit Rating");
this.put2(145,"Crit Rating","Haste Rating");
this.put2(146,"Crit Rating","Expertise Rating");
this.put2(147,"Crit Rating","Mastery");
this.put2(148,"Haste Rating","Spirit");
this.put2(149,"Haste Rating","Dodge Rating");
this.put2(150,"Haste Rating","Parry Rating");
this.put2(151,"Haste Rating","Hit Rating");
this.put2(152,"Haste Rating","Crit Rating");
this.put2(153,"Haste Rating","Expertise Rating");
this.put2(154,"Haste Rating","Mastery");
this.put2(155,"Expertise Rating","Spirit");
this.put2(156,"Expertise Rating","Dodge Rating");
this.put2(157,"Expertise Rating","Parry Rating");
this.put2(158,"Expertise Rating","Hit Rating");
this.put2(159,"Expertise Rating","Crit Rating");
this.put2(160,"Expertise Rating","Haste Rating");
this.put2(161,"Expertise Rating","Mastery");
this.put2(162,"Mastery","Spirit");
this.put2(163,"Mastery","Dodge Rating");
this.put2(164,"Mastery","Parry Rating");
this.put2(165,"Mastery","Hit Rating");
this.put2(166,"Mastery","Crit Rating");
this.put2(167,"Mastery","Haste Rating");
this.put2(168,"Mastery","Expertise Rating");
 */
public class ReforgeDB {
	
	HashMap<Integer,Reforge> reforgeDB = new HashMap<Integer,Reforge>();
	
	public ReforgeDB(){
		populateReforgeDB();
	}
	
	public Reforge getReforge(int id){
		if(reforgeDB.containsKey(id)){
			return reforgeDB.get(id);
		}
		System.out.println("unknown reforgeid: "+  id);
		return null;
	}
	
	public Reforge getReforge(Reforge r){
		for(Reforge reforge : reforgeDB.values()){
			if(reforge.equals(r))
				return reforge;
		}
		return null;
	}
	
	private void populateReforgeDB() {
		this.put2(113,"Spirit","Dodge Rating");
		this.put2(114,"Spirit","Parry Rating");
		this.put2(115,"Spirit","Hit Rating");
		this.put2(116,"Spirit","Crit Rating");
		this.put2(117,"Spirit","Haste Rating");
		this.put2(118,"Spirit","Expertise Rating");
		this.put2(119,"Spirit","Mastery Rating");
		this.put2(120,"Dodge Rating","Spirit");
		this.put2(121,"Dodge Rating","Parry Rating");
		this.put2(122,"Dodge Rating","Hit Rating");
		this.put2(123,"Dodge Rating","Crit Rating");
		this.put2(124,"Dodge Rating","Haste Rating");
		this.put2(125,"Dodge Rating","Expertise Rating");
		this.put2(126,"Dodge Rating","Mastery Rating");
		this.put2(127,"Parry Rating","Spirit");
		this.put2(128,"Parry Rating","Dodge Rating");
		this.put2(129,"Parry Rating","Hit Rating");
		this.put2(130,"Parry Rating","Crit Rating");
		this.put2(131,"Parry Rating","Haste Rating");
		this.put2(132,"Parry Rating","Expertise Rating");
		this.put2(133,"Parry Rating","Mastery Rating");
		this.put2(134,"Hit Rating","Spirit");
		this.put2(135,"Hit Rating","Dodge Rating");
		this.put2(136,"Hit Rating","Parry Rating");
		this.put2(137,"Hit Rating","Crit Rating");
		this.put2(138,"Hit Rating","Haste Rating");
		this.put2(139,"Hit Rating","Expertise Rating");
		this.put2(140,"Hit Rating","Mastery Rating");
		this.put2(141,"Crit Rating","Spirit");
		this.put2(142,"Crit Rating","Dodge Rating");
		this.put2(143,"Crit Rating","Parry Rating");
		this.put2(144,"Crit Rating","Hit Rating");
		this.put2(145,"Crit Rating","Haste Rating");
		this.put2(146,"Crit Rating","Expertise Rating");
		this.put2(147,"Crit Rating","Mastery Rating");
		this.put2(148,"Haste Rating","Spirit");
		this.put2(149,"Haste Rating","Dodge Rating");
		this.put2(150,"Haste Rating","Parry Rating");
		this.put2(151,"Haste Rating","Hit Rating");
		this.put2(152,"Haste Rating","Crit Rating");
		this.put2(153,"Haste Rating","Expertise Rating");
		this.put2(154,"Haste Rating","Mastery Rating");
		this.put2(155,"Expertise Rating","Spirit");
		this.put2(156,"Expertise Rating","Dodge Rating");
		this.put2(157,"Expertise Rating","Parry Rating");
		this.put2(158,"Expertise Rating","Hit Rating");
		this.put2(159,"Expertise Rating","Crit Rating");
		this.put2(160,"Expertise Rating","Haste Rating");
		this.put2(161,"Expertise Rating","Mastery Rating");
		this.put2(162,"Mastery Rating","Spirit");
		this.put2(163,"Mastery Rating","Dodge Rating");
		this.put2(164,"Mastery Rating","Parry Rating");
		this.put2(165,"Mastery Rating","Hit Rating");
		this.put2(166,"Mastery Rating","Crit Rating");
		this.put2(167,"Mastery Rating","Haste Rating");
		this.put2(168,"Mastery Rating","Expertise Rating");
	}
	
	private void put2(Integer key,String from,String to){
		reforgeDB.put(key, new Reforge(from,to));
	}
	
	public HashMap<Integer,Reforge> getDB(){
		return reforgeDB;
	}
}
